package com.cloudbroker.openapi.mobile.controller;
import static com.cloudbroker.bcs.platform.dav.common.util.RequestUtil.getSingleParameterMapForBody;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

import com.cloudbroker.bcs.common.entity.HSBCPSBackNumVO;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.cloudbroker.bcs.common.entity.HSBCPSBackVO;
import com.cloudbroker.bcs.common.util.VOUtil;
import com.cloudbroker.bcs.platform.dav.bizapi.service.business.upvote.vo.BrokerUpvoteClickForm;
import com.cloudbroker.bcs.platform.dav.bizapi.t2service.business.UpvoteT2BizService;
import com.cloudbroker.bcs.platform.dav.common.ext.annotation.SaveLog;

/**
 * Created by wangxu13798 on 2016/10/26.
 */
@Controller
public class VoteController {
    @Resource
    private UpvoteT2BizService upvoteT2;
    /**
     * 投顾投票
     * */
    @ResponseBody
    @RequestMapping("/func_broker_upvote_click")
    @SaveLog(remark = "投顾投票")
    public HSBCPSBackNumVO funcBrokerUpvoteClick(HttpServletRequest request, String jsonpcallback) {
        BrokerUpvoteClickForm form = getSingleParameterMapForBody(request, BrokerUpvoteClickForm.class);
        return VOUtil.setJsonpResult(upvoteT2.funcBrokerUpvoteClick(form), jsonpcallback);
    }
}
